package com.turing.post.salesmanage.util;

// default package

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 * 充值单状态迁移明细
 * 
 * @author zxppanda
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "DEPOSITORDERACTIONDETAIL")
@IdClass(DepositOrderActionDetail.class)
public class DepositOrderActionDetail implements java.io.Serializable {

	public static final String DEPOSITOAD_ACTIONTYPE_ENDINPUT = "0";// 0 – 录入结束
	public static final String DEPOSITOAD_ACTIONTYPE_Send = "2";// 2打包上送
	public static final String DEPOSITOAD_ACTIONTYPE_PAIDCLEAR = "1";// 1付清充值款
	public static final String DEPOSITOAD_ACTIONTYPE_AUDIT = "3";// 3充值审核
	public static final String DEPOSITOAD_ACTIONTYPE_AUDITCANCEL = "4";// 4取消审核
	public static final String DEPOSITOAD_ACTIONTYPE_CONFIRMDEPOSIT = "5";// 5确认充值
	public static final String DEPOSITOAD_ACTIONTYPE_CANCELDEPOSIT = "6";// 6取消充值
	public static final String DEPOSITOAD_ACTIONTYPE_REVOCATIONPAID = "8";// 8撤销付清
	public static final String DEPOSITOAD_ACTIONTYPE_CANCELINPUT = "C";// C取消充值单
	public static final String DEPOSITOAD_ACTIONTYPE_AuthMoney = "7";// 7资金审核
	/**
	 * 创建
	 */
	public static final String DEPOSITORDER_ACTIONTYPE_INSERT = "9";

	private BigInteger depositOrderId;// 充值单ID Int Not Null 参考DepositOrder
	private Date actionTime;// 操作时间 Date Not Null 精确到秒
	private BigInteger operId;//
	private String initialStatus;// 初始状态参考DepositOrder.OrderStatus定义
	private String endStatus;// 结束状态参考DepositOrder.OrderStatus定义
	private String actionType;// 操作类型 char(1) Not Null
	private String remark;

	public DepositOrderActionDetail() {

	}

	@Id
	@Column(name = "DEPOSITORDERID")
	public BigInteger getDepositOrderId() {
		return depositOrderId;
	}

	public void setDepositOrderId(BigInteger depositOrderId) {
		this.depositOrderId = depositOrderId;
	}

	@Id
	@Column(name = "ACTIONTIME")
	public Date getActionTime() {
		return actionTime;
	}

	public void setActionTime(Date actionTime) {
		this.actionTime = actionTime;
	}

	@Column(name = "OPERID")
	public BigInteger getOperId() {
		return operId;
	}

	public void setOperId(BigInteger operId) {
		this.operId = operId;
	}

	@Column(name = "INITIALSTATUS")
	public String getInitialStatus() {
		return initialStatus;
	}

	public void setInitialStatus(String initialStatus) {
		this.initialStatus = initialStatus;
	}

	@Column(name = "ENDSTATUS")
	public String getEndStatus() {
		return endStatus;
	}

	public void setEndStatus(String endStatus) {
		this.endStatus = endStatus;
	}

	@Column(name = "ACTIONTYPE")
	public String getActionType() {
		return actionType;
	}

	public void setActionType(String actionType) {
		this.actionType = actionType;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((getDepositOrderId() == null) ? 0 : getDepositOrderId()
						.hashCode());
		result = prime * result
				+ ((getActionTime() == null) ? 0 : getActionTime().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final DepositOrderActionDetail other = (DepositOrderActionDetail) obj;
		if (getDepositOrderId() == null) {
			if (other.getDepositOrderId() != null)
				return false;
		} else if (!getDepositOrderId().equals(other.getDepositOrderId()))
			return false;
		if (getActionTime() == null) {
			if (other.getActionTime() != null)
				return false;
		} else if (!getActionTime().equals(other.getActionTime()))
			return false;
		return true;
	}
}